local function read_file(file_name)
        if not file_name then
                return nil, "missing file_name"
        end
        local file = io.open(file_name,'r')
        if not file then
                return nil, "can\'t open file \"" .. file_name .. "\""
        end
        local content = file:read('*all')
        file:close()
        return content, nil
end
local  pcip = ngx.shared.pcip
local  class = pcip:get("gclass")
local  hclass = "/home/yan/www/"..class
local str = "<!DOCTYPE html><html><head><meta charset='utf-8'><link href='yan.css' rel='stylesheet'></head><body style='color:DarkViolet; font-size:14px'><table width='100%'><tr><td>"
for i=101,160 do
        ip = "192.168.11."..i
        local name = pcip:get(ip)
        if name ~= nill
        then
                local ipath = "'df/"..class.."/"..ngx.today().."/"..name.."/'"
                str = str..name.."\r\n<br><br>"
        else
                local ipname2 = string.sub(ip,13).."     "
                str = str..ipname2.."\r\n<br><br>"
        end
        if(i==112 or i == 124 or i == 136 or i == 148)
                then
                        str = str .. "</td><td>"
                end
end
str = str .. "</td></tr></table></body></html> "
ngx.say(str)

